package com.heima.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.heima.pojo.Order;
import com.heima.pojo.vo.OrderPartnerVo;
import com.heima.pojo.vo.OrderVo;
import com.heima.utils.PageResult;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @author 赵超
 */
public interface OrderService extends IService<Order> {
    PageResult<OrderVo> search(Integer pageIndex, Integer pageSize, String orderNo, LocalDate startDate, LocalDate endDate);

    String orderCount(Integer partnerId, LocalDateTime start, LocalDateTime end);

    BigDecimal orderAmount(Integer partnerId, LocalDateTime start, LocalDateTime end);

    BigDecimal totalBill(Integer partnerId, LocalDateTime start, LocalDateTime end);

    PageResult<OrderPartnerVo> query( String partnerName,
                                     Integer pageIndex,
                                     Integer pageSize,
                                     LocalDate start,
                                     LocalDate end);
}
